<script setup lang="ts">
import { ref } from "vue";
import { formRules } from "./utils/rule";
import { FormProps } from "./utils/types";
import UploadIcon from "@iconify-icons/ri/upload-2-line";
import { usePublicFormats } from "../formats";

const props = withDefaults(defineProps<FormProps>(), {
  id: String, // 添加 id prop
  formInline: () => ({
    park_name: "",
    car_number: "",
    image: "",
    question: ""
  })
});

const ruleFormRef = ref();
const newFormInline = ref(props.formInline);

function getRef() {
  return ruleFormRef.value;
}

const { parkListOptions } = usePublicFormats();

defineExpose({ getRef });
</script>

<template>
  <el-form
    ref="ruleFormRef"
    :model="newFormInline"
    :rules="formRules"
    label-width="82px"
  >
    <el-form-item label="回复内容" prop="answer">
      <el-input
        v-model="newFormInline.answer"
        placeholder="请输入回复内容"
        type="textarea"
      />
    </el-form-item>
    <el-form-item label="备注" prop="remark">
      <el-input v-model="newFormInline.remark" placeholder="请输入备注" />
    </el-form-item>
  </el-form>
</template>
